package com.javacoo.xservice.base.support.security.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * 安全配置
 * <li></li>
 * @author duanyong@jccfc.com
 * @date 2021/4/15 18:12
 */
@Configuration
@ConfigurationProperties(prefix = SecurityConfig.PREFIX)
@ConditionalOnProperty(prefix = SecurityConfig.PREFIX, value = SecurityConfig.ENABLED, matchIfMissing = true)
public class SecurityConfig {
    public static final String PREFIX = "app.config.security";
    public static final String ENABLED = "enabled";
    /** 默认实现:,默认值*/
    public static final String DEFAULT_IMPL= "default";
    /**是否可用*/
    private String enabled = ENABLED;
    /**实现*/
    private String impl = DEFAULT_IMPL;

    public String getEnabled() {
        return enabled;
    }

    public void setEnabled(String enabled) {
        this.enabled = enabled;
    }

    public String getImpl() {
        return impl;
    }

    public void setImpl(String impl) {
        this.impl = impl;
    }
}
